<template>
  <div class="home">
    <keep-alive>
    <router-view />
</keep-alive>
    <div class="bottom center">
      <div class="look_me">
        <button class="top_bt click_bt" @click="go('/home/doctor')">找医生</button>
      </div>
      <div class="look_me">
        <button class="top_bt click_bt" @click="go('/home/Health')">健康咨询</button>
      </div>
      <div class="look_me">
        <button class="top_bt click_bt" @click="go('/home/question')">客服</button>
      </div>
      <div class="look_me">
        <button class="top_bt click_bt" @click="logout">登出</button>
      </div>
    </div>
  </div>
</template>

<script>
// @ is an alias to /src

export default {
  name: "Home",
  inject: ["reload"],
  data() {
    return {
      addShowFlag: false,
      null_lover: false,
      editFlag: false,
      editingFlag: false,
      EditTasks: {},
      EditTasksChanged: false,
    };
  },
  computed: {},
  methods: {
    logout() {
      window.localStorage.clear()
      // if (localStorage.getItem("token") != null) {
      //   localStorage.removeItem("token");
      // }
      this.$router.push({
        name: "Login",
      });
    },
    go(url){
      this.$router.push(url)
    }
  },
  mounted: function () {},
};
</script>
<style>
.tag_tanchuang {
  position: absolute;
  top: 150px;
  width: 80%;
  left: 10%;
  height: fit-content;
  background-color: rgba(199, 194, 186, 0.9);
  border: 0px solid red;
  border-radius: 5%;
}
</style>
<style scoped>
* {
  margin: 0;
  padding: 0;
  font-family: ShouXie;
}
.home {
  position: relative;
  height: 89vh;
  display: flex;
  flex-direction: column;
  margin: 1vh 0;
  border: 5px solid rgb(165, 164, 164);
  border-radius: 4%;
}
/* div{
  border: 2px solid red;
} */
.center {
  width: 100%;
  margin: 0 auto;
}
.top_time,
.bottom {
  position: absolute;
  bottom: 0px;
  height: 45px;
  display: flex;
  flex-direction: row;
}
.task_content {
  flex-grow: 18;
  height: 72vh;
  /* overflow-y: scroll; */
}
.look_me,
.look_ta {
  flex-grow: 1;
  margin: auto 0;
  height: 72%;
}
.choose_time {
  flex-grow: 1.2;
  margin: auto 0;
}
.look_me .top_bt,
.look_ta .top_bt {
  width: 75%;
  margin: auto 0;
  height: 100%;
  border: 3px solid rgba(72, 139, 170, 1);
  border-radius: 23%;
  font-size: 18px;
  font-family: ShouXie;
  color: rgba(8, 9, 10, 0.88);
}

.choose_time .top_bt {
  /* max-width: fit-content; */
  margin: auto 0;
  height: 100%;
}
</style>